import Vue from 'vue'
import VueRouter from 'vue-router'
import Login from '../views/login/index.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/',
        name: 'Main',
        component: () => import('../views/main/index.vue'),
        children: [
            {
                path: '/colour',
                name: 'Colour',
                component: () => import('../views/colour/index.vue')
            },
            {
                path: '/type',
                name: 'Type',
                component: () => import('../views/type/index.vue')
            },
            {
                path: '/product',
                name: 'Product',
                component: () => import('../views/product/index.vue')
            },
            {
                path: '/goods',
                name: 'Goods',
                component: () => import('../views/goods/index.vue')
            },
            {
                path: '/brand',
                name: 'Brand',
                component: () => import('../views/brand/index.vue')
            },
            {
                path: '/price',
                name: 'Price',
                component: () => import('../views/price/index.vue')
            },
            {
                path: '/priceAudit',
                name: 'PriceAudit',
                component: () => import('../views/priceAudit/index.vue')
            },
            //b2c
            {
                path: `/order/order`,
                name: `Order`,
                component: () => import("../views/b2c/order/index.vue"),
            },
            {
                path:"/order/orderInfo/:id",
                name: "OrderInfo",
                component:()=>import("../views/b2c/orderInfo/index.vue"),
            },
            {
                path: "/order/online",
                name: "OrderOnline",
                component:()=> import("../views/b2c/orderOnline/index.vue")
            },
            //添加订单
            {
              path:"/order/addOrder",
              name: "AddOrder",
              component:()=>import("../views/b2c/addOrder/addOrder.vue")
            },
            {
                path: "/order/shopping",
                name: "ShoppingCart",
                component:()=>import("../views/b2c/shoppingCart/index.vue")

            },
            //b2c订单出库
            {
                path: "/order/orderOutStock",
                name:"orderInfo",
                component:()=>import("../views/b2c/orderOutStock/index.vue")
            },
            {
                path: "/order/Goods",
                name: `OrderGoods`,
                component: () => import("../views/b2c/orderGoods/index.vue")
            },
            {
                path: "/order/returnGood",
                name: `returnGoods`,
                component:()=>import("../views/b2c/returnGoods/index.vue")
            },
            //b2c销售统计
            {
                path: '/salesOutbound',
                name: 'salesOutbound',
                component: () => import('../views/stock/salesOutbound/index.vue'),
            },
       
            //==================================================================================
            //stock
            {
                path: '/lookOrder/:id',
                name: 'lookOrder',
                component: () => import('../views/stock/lookOrder/index.vue')
            },
            {
                path: '/putStorage',
                name: 'putStorage',
                component: () => import('../views/stock/putStorage/index.vue')
            },
            {
                path: '/putStorageDetails/:id',
                name: 'putStorageDetails',
                component: () => import('../views/stock/putStorageDetails/index.vue'),
            },
            {
                path: '/inputImel/:id/:rid',
                name: 'inputImel',
                component: () => import('../views/stock/putStorageDetails/inputImel.vue')
            },

        ]

    }

]

const router = new VueRouter({
    routes,
    mode: 'history'
})

export default router
